﻿@using SelfMadeMillionaire.Web.Infrastructure.ViewModels.Education
@using PagedList.Mvc
@model EducationListViewModel

	<div class="table-responsive">
		@if (Model.Publications.Any())
  {
			<table class="table table-bordered tablesorter">
				<thead>
					<tr>
						<th width="20%"><a href="#">Date</a></th>
						<th width="80%"><a href="#">Title</a></th>
					</tr>
				</thead>
				<tbody>
					@foreach (var pub in Model.Publications)
	 {
						<tr>
							<td>@pub.CreatedDate.ToString("MM/dd/yyyy")</td>
							<td><a href="@Url.Action("Details", "Publications", new { id = pub.ID, area = "" })">@pub.Title</a></td>
						</tr>
	 }
				</tbody>
			</table>
	  @Html.PagedListPager(Model.Publications, page => Url.Action("Index", new { page }))
  }
  else
  {
			<p>No records found.</p>
  }
	</div>

<script type="text/javascript">
	$(function () {
		$("#publications-list table").tablesorter();	
	});
</script>